import javax.swing.*;
//import java.awt.*;
// import java.awt.event.*;
 import java.net.*;
import java.io.*;



 public class WebReader extends JFrame {

	 
	 public WebReader() {
		
		
		 //JScrollPane pane = new JScrollPane();
		
		 
		}
	 
void ververs(String motor)  {
	 setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	 setSize(600, 300); 
	setTitle("Quicknity Terminal");
  int testgetal = 20;	
  System.out.println(testgetal);

  JTextArea pane = new JTextArea();
	 add(pane);
	 
	  pane.setText(motor);
	  
	  setVisible(true);
}
	 
	 
     void getData(String address1) throws MalformedURLException {
       String address = "http://jwz.quicknity.com";
    	 setTitle("Quicknity Terminal Preloader");
         URL page = new URL(address);
         StringBuffer text = new StringBuffer();
         try {
             HttpURLConnection conn = (HttpURLConnection)
                 page.openConnection();
             conn.connect();
             InputStreamReader in = new InputStreamReader(
                 (InputStream) conn.getContent());
             BufferedReader buff = new BufferedReader(in);
            // System.out.println("Getting data ...");
             
             String line;
             do {
                 line = buff.readLine();
				 // 
                 text.append(line + "\n");
				
             } while (line != null);
             String fiets = text.toString();
			 String motor;
			  motor = fiets.replace("null", " ");
             System.out.println(motor);
            // pane.setText(motor);
             WebReader st = new WebReader();
             st.ververs(motor);
         } catch (IOException ioe) {
             System.out.println("Fout:" + ioe.getMessage());
        }
     }

     public static void main(String[] arguments) {
         if (arguments.length > 1337) {
             //System.out.println("Fout :)");
             System.exit(1);
         }
         try {
    	 // System.out.println("Nu de main");
             WebReader app = new WebReader();
           String frits = "Dit hoort niet";
           app.getData(frits);
           
        } catch (MalformedURLException mue) {
             //System.out.println("Bad URL: " + arguments[0]);
         }
     }
 }     